{include file="public/header" /}



<div class="page">
    <div class="fixed-empty"></div>
    <form id="post_form" method="post" name="form1">
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                    <td colspan="2" class="required"><label class="validation" for="reason_info">{$Think.lang.refund_buyer_message}:</label></td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input id="reason_info" name="reason_info" value="" class="txt" type="text"></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr>
                    <td colspan="2" class="required"><label class="validation" for="reason_sort">{$Think.lang.ds_sort}:</label>
                    </td>
                </tr>
                <tr class="noborder">
                    <td class="vatop rowform"><input type="text" value="100" name="reason_sort" id="reason_sort" class="txt"></td>
                    <td class="vatop tips">{$Think.lang.reason_sort_tips}</td>
                </tr>
            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="15" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script>
//按钮先执行验证再提交表单
    $(function () {
        $("#post_form").validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parent().parent().prev().find('td:first'));
            },
            rules: {
                reason_info: {
                    required: true
                },
                reason_sort: {
                    required: true,
                    digits: true,
                    range: [0, 255]
                }
            },
            messages: {
                reason_info: {
                    required: "{$Think.lang.reason_info_required}"
                },
                reason_sort: {
                    required: "{$Think.lang.reason_sort_digits}",
                    digits: "{$Think.lang.reason_sort_digits}",
                    range: '{$Think.lang.reason_sort_tips}'
                }
            }
        });
    });

</script>
